]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
backgroundMenu: Ignore releases when using long-press
authorJasper St. Pierre <jstpierre@mecheye.net>
Tue, 23 Apr 2013 20:39:29 +0000 (16:39 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 26 Apr 2013 15:23:37 +0000 (11:23 -0400)
Otherwise, a release from the long-press will be seen as a
button event that should close the menu.

https://bugzilla.gnome.org/show_bug.cgi?id=697203

js/ui/backgroundMenu.js

index 1328b3f89dd346b3728288bf6c5082dd35873ffa..06e698ca70251e3b8c34446315140e65c45c8927 100644 (file)
@@ -46,8 +46,10 @@ function addBackgroundMenu(actor) {
     clickAction.connect('long-press', function(action, actor, state) {
         if (state == Clutter.LongPressState.QUERY)
             return action.get_button() == 1 && !actor._backgroundMenu.isOpen;
-        if (state == Clutter.LongPressState.ACTIVATE)
+        if (state == Clutter.LongPressState.ACTIVATE) {
             openMenu();
+            actor._backgroundManager.ignoreRelease();
+        }
         return true;
     });
     clickAction.connect('clicked', function(action) {